﻿Imports System.Xml.Serialization

<Serializable()> _
Public Class ClsCodeConfig
    Dim mCodeTitle As String
    ''' <summary>
    ''' 代码标题
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Property CodeTitle() As String
        Get
            Return mCodeTitle
        End Get
        Set(ByVal value As String)
            mCodeTitle = value
        End Set
    End Property
    Dim mLanguage As String
    ''' <summary>
    ''' 语言
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Property Language() As String
        Get
            Return mLanguage
        End Get
        Set(ByVal value As String)
            mLanguage = value
        End Set
    End Property
    Dim mKeyWordList As New List(Of clsKeyWord)
    ''' <summary>
    ''' 关键字列表
    ''' </summary>
    ''' <remarks></remarks>
    Property KeyWordList() As List(Of clsKeyWord)
        Get
            Return mKeyWordList
        End Get
        Set(ByVal value As List(Of clsKeyWord))
            mKeyWordList = value
        End Set
    End Property
    Dim mSplitMark As New List(Of String)
    ''' <summary>
    ''' 分词符号列表
    ''' </summary>
    ''' <remarks></remarks>
    Property SplitMark() As List(Of String)
        Get
            Return mSplitMark
        End Get
        Set(ByVal value As List(Of String))
            mSplitMark = value
        End Set
    End Property
#Region "文字颜色"
    ''' <summary>
    ''' 文字颜色
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks>颜色不能被XML序列化，XML序列化的时候用ARBG来实现</remarks>
    <XmlIgnore()> _
    Property TextColor() As Color
        Get
            Return mTextColor.GetSavedColor
        End Get
        Set(ByVal value As Color)
            mTextColor.SetSavedColor(value)
        End Set
    End Property
    Dim mTextColor As New SerializableColor
    Property TextColorEx() As SerializableColor
        Get
            Return mTextColor
        End Get
        Set(ByVal value As SerializableColor)
            mTextColor = value
        End Set
    End Property
#End Region
#Region "背景颜色"
    ''' <summary>
    ''' 背景颜色
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks>颜色不能被XML序列化，XML序列化的时候用ARBG来实现</remarks>
    <XmlIgnore()> _
    Property BackColor() As Color
        Get
            Return mBackColor.GetSavedColor
        End Get
        Set(ByVal value As Color)
            mBackColor.SetSavedColor(value)
        End Set
    End Property
    Dim mBackColor As New SerializableColor
    Property BackColorEx() As SerializableColor
        Get
            Return mBackColor
        End Get
        Set(ByVal value As SerializableColor)
            mBackColor = value
        End Set
    End Property
#End Region
#Region "选中文字颜色"
    ''' <summary>
    ''' 选中文字颜色
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks>颜色不能被XML序列化，XML序列化的时候用ARBG来实现</remarks>
    <XmlIgnore()> _
    Property SelectTextColor() As Color
        Get
            Return mSelectTextColor.GetSavedColor
        End Get
        Set(ByVal value As Color)
            mSelectTextColor.SetSavedColor(value)
        End Set
    End Property
    Dim mSelectTextColor As New SerializableColor
    Property SelectTextColorEx() As SerializableColor
        Get
            Return mSelectTextColor
        End Get
        Set(ByVal value As SerializableColor)
            mSelectTextColor = value
        End Set
    End Property
#End Region
#Region "选中背景颜色"
    ''' <summary>
    ''' 选中背景颜色
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks>颜色不能被XML序列化，XML序列化的时候用ARBG来实现</remarks>
    <XmlIgnore()> _
    Property SelectBackColor() As Color
        Get
            Return mSelectBackColor.GetSavedColor
        End Get
        Set(ByVal value As Color)
            mSelectBackColor.SetSavedColor(value)
        End Set
    End Property
    Dim mSelectBackColor As New SerializableColor
    Property SelectBackColorEx() As SerializableColor
        Get
            Return mSelectBackColor
        End Get
        Set(ByVal value As SerializableColor)
            mSelectBackColor = value
        End Set
    End Property
#End Region
#Region "标尺颜色"
    ''' <summary>
    ''' 标尺颜色
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks>颜色不能被XML序列化，XML序列化的时候用ARBG来实现</remarks>
    <XmlIgnore()> _
    Property RulerColor() As Color
        Get
            Return mRulerColor.GetSavedColor
        End Get
        Set(ByVal value As Color)
            mRulerColor.SetSavedColor(value)
        End Set
    End Property
    Dim mRulerColor As New SerializableColor
    Property RulerColorEx() As SerializableColor
        Get
            Return mRulerColor
        End Get
        Set(ByVal value As SerializableColor)
            mRulerColor = value
        End Set
    End Property
#End Region
    Dim mLeftLimit As Byte
    ''' <summary>
    ''' 左边标尺
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Property LeftLimit() As Byte
        Get
            Return mLeftLimit
        End Get
        Set(ByVal value As Byte)
            mLeftLimit = value
        End Set
    End Property
    Dim mRightLimit As Byte
    ''' <summary>
    ''' 右边标尺
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Property RightLimit() As Byte
        Get
            Return mRightLimit
        End Get
        Set(ByVal value As Byte)
            mRightLimit = value
        End Set
    End Property
    Dim mSingleCommentMark As String
    ''' <summary>
    ''' 注释符号
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Property SingleCommentMark() As String
        Get
            Return mSingleCommentMark
        End Get
        Set(ByVal value As String)
            mSingleCommentMark = value
        End Set
    End Property
    Dim mBlockCommentStart As String
    ''' <summary>
    ''' 块注释开始符号
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Property BlockCommentStart() As String
        Get
            Return mBlockCommentStart
        End Get
        Set(ByVal value As String)
            mBlockCommentStart = value
        End Set
    End Property
    Dim mBlockCommentEnd As String
    ''' <summary>
    ''' 块注释结束符号
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Property BlockCommentEnd() As String
        Get
            Return mBlockCommentEnd
        End Get
        Set(ByVal value As String)
            mBlockCommentEnd = value
        End Set
    End Property
    Dim mSytaxKeyList As New List(Of TextBoxPrj.SyntaxKey)
    ''' <summary>
    ''' 折叠规则
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Property SytaxKeyList() As List(Of TextBoxPrj.SyntaxKey)
        Get
            Return mSytaxKeyList
        End Get
        Set(ByVal value As List(Of TextBoxPrj.SyntaxKey))
            mSytaxKeyList = value
        End Set
    End Property
#Region "注释颜色"
    <XmlIgnore()> _
    Property CommentColor() As Color
        Get
            Return mCommentColor.GetSavedColor
        End Get
        Set(ByVal value As Color)
            mCommentColor.SetSavedColor(value)
        End Set
    End Property
    Dim mCommentColor As New SerializableColor
    ''' <summary>
    ''' 注释颜色
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    Property CommentColorEx() As SerializableColor
        Get
            Return mCommentColor
        End Get
        Set(ByVal value As SerializableColor)
            mCommentColor = value
        End Set
    End Property
#End Region
End Class
<Serializable()> _
Public Class clsKeyWord
    Dim mWord As String
    ''' <summary>
    ''' 关键字
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Property Word() As String
        Get
            Return mWord
        End Get
        Set(ByVal value As String)
            mWord = value
        End Set
    End Property
#Region "关键字颜色"
    ''' <summary>
    ''' 关键字颜色
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks>颜色不能被XML序列化，XML序列化的时候用ARBG来实现</remarks>
    <XmlIgnore()> _
    Property WordColor() As Color
        Get
            Return mWordColor.GetSavedColor
        End Get
        Set(ByVal value As Color)
            mWordColor.SetSavedColor(value)
        End Set
    End Property
    Dim mWordColor As New SerializableColor
    Property RulerColorEx() As SerializableColor
        Get
            Return mWordColor
        End Get
        Set(ByVal value As SerializableColor)
            mWordColor = value
        End Set
    End Property
#End Region
    Dim mToolTips As String
    ''' <summary>
    ''' 提示文本
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Property ToolTips() As String
        Get
            Return mToolTips
        End Get
        Set(ByVal value As String)
            mToolTips = value
        End Set
    End Property
    Dim mIntellisense As Boolean
    ''' <summary>
    ''' 是否用于智能感知
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Property Intellisense() As Boolean
        Get
            Return mIntellisense
        End Get
        Set(ByVal value As Boolean)
            mIntellisense = value
        End Set
    End Property
    Dim mAutoStructure As String
    ''' <summary>
    ''' 自动完成结构
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Property AutoStructure() As String
        Get
            Return mAutoStructure
        End Get
        Set(ByVal value As String)
            mAutoStructure = value
        End Set
    End Property

End Class
<Serializable()> _
Public Class SerializableColor
    Function GetSavedColor() As Color
        Return Color.FromArgb(mColor_A, mColor_R, mColor_G, mColor_B)
    End Function
    Sub SetSavedColor(ByVal value As Color)
        mColor_A = value.A
        mColor_R = value.R
        mColor_G = value.G
        mColor_B = value.B
    End Sub
    Dim mColor_A As Byte
    Property Color_A() As Byte
        Get
            Return mColor_A
        End Get
        Set(ByVal value As Byte)
            mColor_A = value
        End Set
    End Property
    Dim mColor_R As Byte
    Property Color_R() As Byte
        Get
            Return mColor_R
        End Get
        Set(ByVal value As Byte)
            mColor_R = value
        End Set
    End Property
    Dim mColor_G As Byte
    Property Color_G() As Byte
        Get
            Return mColor_G
        End Get
        Set(ByVal value As Byte)
            mColor_G = value
        End Set
    End Property
    Dim mColor_B As Byte
    Property Color_B() As Byte
        Get
            Return mColor_B
        End Get
        Set(ByVal value As Byte)
            mColor_B = value
        End Set
    End Property
End Class

